<#assign base=request.contextPath />
<#import "/tags/select.ftl" as k />
<!DOCTYPE html>
<html>
<head>
  <base href="${base}">	
  <meta charset="utf-8">
  <title>列表</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  <link rel="stylesheet" href="${base}/layuiadmin/layui/css/layui.css" media="all">
  <link rel="stylesheet" href="${base}/css/my.css" media="all">
</head>

<body>
  	<div class="layui-form" lay-filter="LAY-form-list" style="padding: 20px 30px 0 0;">
  		<input type="hidden" name="oid" value="${(examResult.oid)!}">
	    <div class="layui-form-item layui-hide">
	      	<input type="button" lay-submit lay-filter="LAY-form-submit" id="LAY-form-submit" value="确认添加">
	      	<input type="button" lay-submit lay-filter="LAY-form-edit" id="LAY-form-edit" value="确认编辑">
	    </div>
  	</div>

  <script src="${base}/js/lib/jquery-1.11.3.min.js"></script>
  <script src="${base}/js/commons.js"></script>
  <script src="${base}/layuiadmin/layui/layui.js"></script>
  <script>
  	layui.config({
    	base: '${base}/layuiadmin/' //静态资源所在路径
  	}).extend({
    	index: 'lib/index'
  	}).use(['index', 'form', 'laydate'], function(){
    	var form = layui.form;
    	
    	
    	//监听提交
    	form.on('submit(LAY-form-submit)', function(data) {
      		var index = parent.layer.getFrameIndex(window.name);      		
      		$$.ajax({
      			url: '${base}/exam/examresult/save',
      			data: data.field,
      			success: function(json) {
      				parent.layui.table.reload('LAY-table');
      	      		parent.layer.close(index);
      			}
      		});
    	});
  	})
  </script>
</body>
</html>